package dmp.topk;

import java.io.IOException;

import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;

public class CountMapper extends Mapper<LongWritable, Text, Text, LongWritable> {
	private  Text resultKey=new Text();
	private LongWritable resultValue=new LongWritable();
	@Override
	protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {
		String line=value.toString();
		resultKey.set(line);
		resultValue.set(1);
		context.write(resultKey, resultValue);
	}
}
